package com.dl.mian.http;



import com.dl.mian.http.model.HttpResult;

import java.util.Dictionary;
import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Url;

public class HttpServiceAPI {

    private static HttpServiceAPI instance;
    public HttpService coreService;

    private HttpServiceAPI() {
        coreService = DataHelper.getInstance().getRetrofit().create(HttpService.class);
    }

    public static HttpServiceAPI getInstance() {
        synchronized (HttpServiceAPI.class) {
            if (instance == null) {
                instance = new HttpServiceAPI();
            }
        }
        return instance;
    }

    public interface HttpService {
                /**
         * 设施概论、液位监测、综合入口
         */
        @GET("app/water/data")
        Observable<HttpResult<Object>> testGet(@Query("dealPersonName") String dealPersonName);

        @POST("app/water/data")
        Observable<HttpResult<Object>> testPostJson(@Body RequestBody body);

        @POST("app/water/data")
        Observable<HttpResult<Object>> testPostForm(@Body RequestBody body);
//        /**
//         * 登录
//         * "mobile_token": "string"
//         */
//        @POST("app/login")
//        Observable<HttpResult<LoginVO>> Login(@Body RequestBody body);
//
//        /**
//         * 设施概论、液位监测、综合入口
//         */
//        @GET("app/water/data")
//        Observable<HttpResult<HomeVO>> getHomeData();


    }
}
